<?php
/** Description of gpa_demo
 *  @package
 *  @version 0.1
 *  @filesource image-detail.php
 *  @author Meta Sanjaya
 *  @date 03 Feb 10 5:20:33
 */

     $imageId = intval($_GET['iid']);
     $detail = $db->query("SELECT a.*, b.description FROM #_gallery_images a LEFT JOIN #_gallery_images_description b ON b.image_id = a.image_id WHERE a.image_id=%u", $imageId)->rows[0];
     $detail['view_url'] = HTTP_SERVER . "?page=gallery&act=view&notcount&iid=" . $detail['image_id'];
     $detail['img_url'] = PAGE_URL . "images/fullscreen/" . $detail['file'];
     $detail['comments'] = $db->query("SELECT * FROM #_comment_image_comments a JOIN #_comment_users_comments b ON b.comment_id = a.comment_id WHERE a.image_id='$imageId' ORDER BY b.time_stamp")->rows;

     include_once 'image-details.html.php';

?>
